3.54 \(\int \text{sech}^2(c+d x) (a+b \text{sech}^2(c+d x)) \, dx\)

Optimal. Leaf size=30 \[ \frac{(a+b) \tanh (c+d x)}{d}-\frac{b \tanh ^3(c+d x)}{3 d} \]

[Out]

((a + b)*Tanh[c + d*x])/d - (b*Tanh[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0402439, antiderivative size = 43, normalized size of antiderivative = 1.43, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4046, 3767, 8} \[ \frac{(3 a+2 b) \tanh (c+d x)}{3 d}+\frac{b \tanh (c+d x) \text{sech}^2(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Sech[c + d*x]^2*(a + b*Sech[c + d*x]^2),x]

[Out]

((3*a + 2*b)*Tanh[c + d*x])/(3*d) + (b*Sech[c + d*x]^2*Tanh[c + d*x])/(3*d)

Rule 4046

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> -Simp[(C*Cot[
e + f*x]*(b*Csc[e + f*x])^m)/(f*(m + 1)), x] + Dist[(C*m + A*(m + 1))/(m + 1), Int[(b*Csc[e + f*x])^m, x], x]
/; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] &&  !LeQ[m, -1]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \text{sech}^2(c+d x) \left (a+b \text{sech}^2(c+d x)\right ) \, dx &=\frac{b \text{sech}^2(c+d x) \tanh (c+d x)}{3 d}+\frac{1}{3} (3 a+2 b) \int \text{sech}^2(c+d x) \, dx\\ &=\frac{b \text{sech}^2(c+d x) \tanh (c+d x)}{3 d}+\frac{(i (3 a+2 b)) \operatorname{Subst}(\int 1 \, dx,x,-i \tanh (c+d x))}{3 d}\\ &=\frac{(3 a+2 b) \tanh (c+d x)}{3 d}+\frac{b \text{sech}^2(c+d x) \tanh (c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.0116299, size = 39, normalized size = 1.3 \[ \frac{a \tanh (c+d x)}{d}-\frac{b \tanh ^3(c+d x)}{3 d}+\frac{b \tanh (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sech[c + d*x]^2*(a + b*Sech[c + d*x]^2),x]

[Out]

(a*Tanh[c + d*x])/d + (b*Tanh[c + d*x])/d - (b*Tanh[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Maple [A]  time = 0.019, size = 34, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ( a\tanh \left ( dx+c \right ) +b \left ({\frac{2}{3}}+{\frac{ \left ({\rm sech} \left (dx+c\right ) \right ) ^{2}}{3}} \right ) \tanh \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(d*x+c)^2*(a+b*sech(d*x+c)^2),x)

[Out]

1/d*(a*tanh(d*x+c)+b*(2/3+1/3*sech(d*x+c)^2)*tanh(d*x+c))

________________________________________________________________________________________

Maxima [B]  time = 1.04349, size = 151, normalized size = 5.03 \begin{align*} \frac{4}{3} \, b{\left (\frac{3 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d{\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}} + \frac{1}{d{\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}}\right )} + \frac{2 \, a}{d{\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="maxima")

[Out]

4/3*b*(3*e^(-2*d*x - 2*c)/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) + 1)) + 1/(d*(3*e^(-2
*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) + 1))) + 2*a/(d*(e^(-2*d*x - 2*c) + 1))

________________________________________________________________________________________

Fricas [B]  time = 1.92377, size = 427, normalized size = 14.23 \begin{align*} -\frac{4 \,{\left ({\left (3 \, a + b\right )} \cosh \left (d x + c\right )^{2} - 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) +{\left (3 \, a + b\right )} \sinh \left (d x + c\right )^{2} + 3 \, a + 3 \, b\right )}}{3 \,{\left (d \cosh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right )^{2} + 2 \,{\left (3 \, d \cosh \left (d x + c\right )^{2} + 2 \, d\right )} \sinh \left (d x + c\right )^{2} + 4 \,{\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 3 \, d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="fricas")

[Out]

-4/3*((3*a + b)*cosh(d*x + c)^2 - 2*b*cosh(d*x + c)*sinh(d*x + c) + (3*a + b)*sinh(d*x + c)^2 + 3*a + 3*b)/(d*
cosh(d*x + c)^4 + 4*d*cosh(d*x + c)*sinh(d*x + c)^3 + d*sinh(d*x + c)^4 + 4*d*cosh(d*x + c)^2 + 2*(3*d*cosh(d*
x + c)^2 + 2*d)*sinh(d*x + c)^2 + 4*(d*cosh(d*x + c)^3 + d*cosh(d*x + c))*sinh(d*x + c) + 3*d)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \operatorname{sech}^{2}{\left (c + d x \right )}\right ) \operatorname{sech}^{2}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)**2*(a+b*sech(d*x+c)**2),x)

[Out]

Integral((a + b*sech(c + d*x)**2)*sech(c + d*x)**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.36054, size = 82, normalized size = 2.73 \begin{align*} -\frac{2 \,{\left (3 \, a e^{\left (4 \, d x + 4 \, c\right )} + 6 \, a e^{\left (2 \, d x + 2 \, c\right )} + 6 \, b e^{\left (2 \, d x + 2 \, c\right )} + 3 \, a + 2 \, b\right )}}{3 \, d{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="giac")

[Out]

-2/3*(3*a*e^(4*d*x + 4*c) + 6*a*e^(2*d*x + 2*c) + 6*b*e^(2*d*x + 2*c) + 3*a + 2*b)/(d*(e^(2*d*x + 2*c) + 1)^3)